<%@ page contentType="text/html; charset=gb2312" language="java"%>
<%@ page language="java" import="java.util.*,control.database.*,java.sql.*"%>
<%
String BranchNo="";
String BranchName="";
String BranchID="";
String SubCenterNo=(String)session.getAttribute("SubCenterNo");

if(request.getParameter("BranchNo")!=null){
	BranchNo=request.getParameter("BranchNo");
}
if(request.getParameter("BranchName")!=null){
	BranchName=new String(request.getParameter("BranchName").toString().getBytes("ISO8859_1"));
}
if(request.getParameter("BranchID")!=null){
	BranchID=request.getParameter("BranchID");
}

String sql="update dbo.CQ_Cmn_Branch set BranchName='"+BranchName+"',SubCenterNo="+SubCenterNo+" where BranchID="+BranchID;
	System.out.println("UPDATE: "+BranchName+"  "+sql);
	DataBase db2 = new DataBase();
	db2.executeUpdate(sql);
	db2.closeStmt();
	db2.closeConn();
response.sendRedirect("BranchNo_add_success.jsp?BranchNo="+BranchNo+"&flag=rest&SubCenterNo="+SubCenterNo);
%>